import request from '/@/utils/request';

export async function checkImgs(params: any) {
	return await request({
		url: `/common/imgs/checkImgs`,
		method: 'post',
		data: params,
	});	
}

export async function queryImgs(relevanceId: Number, type: Number = 0) {
	return await request({
		url: `/common/imgs/${relevanceId}/${type}`,
		method: 'get',
	});
}
export async function queryPagerLogs(params: any) {
	return await request({
		url: '/common/logs',
		method: 'get',
		params,
	});
}
export async function deleteImg(params: any) {
	return await request({
		url: `/common/imgs/delete`,
		method: 'delete',
		data: params,
	});
}
export async function PostBase64Imgs(params: any) {
	return await request({
		url: `/common/upload/base64img`,
		method: 'post',
		data: params,
	});	
}

// rfid修改，复数
export async function putRfids(params?: object) {
	return await request({
		url: 'evidence/rfid',
		method: 'put',
		data: params,
	});
}

// 开柜
export async function openBox(params?: object) {
	return await request({
		url: `/room/box/open`,
		method: 'post',
		data: params,
	});
}

// 请求读卡机读取Rfid数据 大型物品使用
export async function getRfids() {
	return await request({
		url: `/party/rfidreader/readepc`,
		method: 'get',
	});
}

// 盘点
export async function sendPandian(params?: object) {
	return await request({
		url: `/party/handheld/taskdown`,
		method: 'post',
		data: params,
	});
}

// 批量打印
export async function printRfid(params?: object) {
	return await request({
		url: `/party/rfidprinter/propertyprint`,
		method: 'post',
		data: params,
	});
}

// 保存预警设置
export async function saveWarn(params?: object) {
	return await request({
		url: `common/post/waraing`,
		method: 'post',
		data: params,
	});
}
//获取预警设置
export async function geteWarn(classCode: string, categoryCode: string) {
	return await request({
		url: `/common/get/waraing/${classCode}/${categoryCode}`,
		method: 'get',
	});
}

// 保存系统配置
export async function saveSystemConfig(params: object) {
	return await request({
		url: `common/post/systemconfig`,
		method: 'post',
		data: params,
	});
}
// 保存系统配置
export async function querySystemConfig() {
	return await request({
		url: `common/query/systemconfig`,
		method: 'get',
	});
}


// 保存系统配置
export async function saveHardwareConfig(params: object) {
	return await request({
		url: `common/post/Hardware`,
		method: 'post',
		data: params,
	});
}
// 保存系统配置
export async function queryHardwareConfig() {
	return await request({
		url: `common/query/Hardware`,
		method: 'get',
	});
}


// 保存系统配置
export async function saveFlowConfig(params: object) {
	return await request({
		url: `common/post/flowConfig`,
		method: 'post',
		data: params,
	});
}
// 保存系统配置
export async function queryFlowConfig() {
	return await request({
		url: `common/query/FlowConfig`,
		method: 'get',
	});
}
// 保存系统配置
export async function checkReg() {
	return await request({
		url: `common/checkReg`,
		method: 'get',
	});
}
// 保存系统配置
export async function submitReg(params:object) {
	return await request({
		url: `common/submitReg`,
		method: 'post',
		params: params
	});
}
// 清空未读消息数
export async function clearNotificationCount() {
	return await request({
		url: `earlywarning/get/ClearNotificationCount`,
		method: 'get',
	});
}

// 清空未读消息数
export async function modifypwd(data:object) {
	return await request({
		url: `user/put/pwd`,
		method: 'put',
		data,
	});
}


// 数据库备份配置
export async function saveDbBakConfig(params: object) {
	return await request({
		url: `common/post/BakConfig`,
		method: 'post',
		data: params,
	});
}
// 数据库备份配置
export async function queryDbBakConfig() {
	return await request({
		url: `common/query/BakConfig`,
		method: 'get',
	});
}
// 数据库备份配置
export async function queryDbBakList(params:object) {
	return await request({
		url: `common/queryDbBakList`,
		method: 'get',
		params
	});
}
// 数据库备份配置
export async function deleteDbBak(data:object) {
	return await request({
		url: `common/deleteDbBak`,
		method: 'post',
		data
	});
}
